 /**
   * Copyright 2014 Viettel Telecom. All rights reserved.
   * VIETTEL PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
   */
 package com.viettel.core.bussiness.cms; 

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;

import com.viettel.core.dao.cms.ExpertGroupDAO;
import com.viettel.core.entities.cms.ExpertGroup;
import com.viettel.core.exceptions.BusinessException;
import com.viettel.core.exceptions.DataAccessException;
 /**
   *  Mo ta muc dich cua lop (interface)
   *  @author: HUYNHDC
   *  @version:  
   *  @since: 24/06/2014 - 10:50:59
   */
 public class ExpertGroupMgrImpl implements ExpertGroupMgr{ 
	@Autowired 
	ExpertGroupDAO expertGroupDAO; 
 
	/**
	   * 
	   *  @author: HUYNHDC
	   *  @version:  
	   *  @since: 24/06/2014 - 10:50:59
	   */
 	@Override 
	public ExpertGroup getExpertGroupById(Integer id) throws BusinessException { 
		try { 
			return  expertGroupDAO.getExpertGroupById(id); 
		} catch (DataAccessException e) { 
			throw new BusinessException(e); 
		} 
	} 

 	/**
 	   *
 	   *  @author: HUYNHDC
 	   *  @version:  
 	   *  @since: 24/06/2014 - 10:50:59
 	   */
 	@Override 
	public ExpertGroup getExpertGroupByCmsUserId(Integer id) throws BusinessException { 
		try { 
			return  expertGroupDAO.getExpertGroupByCmsUserId(id); 
		} catch (DataAccessException e) { 
			throw new BusinessException(e); 
		} 
	} 
 	/**
	   *  @author: HUYNHDC
	   *  @version:  
	   *  @since: 24/06/2014 - 10:50:59
	   */
	@Override 
	public List<ExpertGroup> lstExpertGroupByCmsUserId(Integer id) throws BusinessException { 
		try { 
			return  expertGroupDAO.lstExpertGroupByCmsUserId(id); 
		} catch (DataAccessException e) { 
			throw new BusinessException(e); 
		} 
	} 
	/**
	   *  @author: HUYNHDC
	   *  @version:  
	   *  @since: 24/06/2014 - 10:50:59
	   */
	@Override 
	public List<ExpertGroup> lstExpertGroupByGroupId(Integer id) throws BusinessException { 
		try { 
			return  expertGroupDAO.lstExpertGroupByGroupId(id); 
		} catch (DataAccessException e) { 
			throw new BusinessException(e); 
		} 
	} 
 	/**
 	   * 
 	   *  @author: HUYNHDC
 	   *  @version:  
 	   *  @since: 24/06/2014 - 10:50:59
 	   */
 	@Override 
	public ExpertGroup createExpertGroup(ExpertGroup expertGroup) throws BusinessException { 
		try { 
			return expertGroupDAO.createExpertGroup(expertGroup); 
		} catch (DataAccessException e) { 
			throw new BusinessException(e); 
		} 
	} 
 
 	/**
 	   * 
 	   *  @author: HUYNHDC
 	   *  @version:  
 	   *  @since: 24/06/2014 - 10:50:59
 	   */
 	@Override 
	public void updateExpertGroup(ExpertGroup expertGroup) throws BusinessException { 
		try { 
			expertGroupDAO.updateExpertGroup(expertGroup); 
		} catch (DataAccessException e) {	 
			throw new BusinessException(e); 
		} 
	} 
 
 	/**
 	   * 
 	   *  @author: HUYNHDC
 	   *  @version:  
 	   *  @since: 24/06/2014 - 10:50:59
 	   */
 	@Override 
	public void deleteExpertGroup(ExpertGroup expertGroup) throws BusinessException { 
		try { 
			expertGroupDAO.deleteExpertGroup(expertGroup); 
		} catch (DataAccessException e) { 
			throw new BusinessException(e); 
		} 
	}
 	/**
	   * 
	   *  @author: HUYNHDC
	   *  @version:  
	   *  @since: 24/06/2014 - 10:50:59
	   */
	@Override 
	public void deleteExpertGroupByCmsUserId(Integer id) throws BusinessException { 
		try { 
			expertGroupDAO.deleteExpertGroupByCmsUserId(id);
		} catch (DataAccessException e) { 
			throw new BusinessException(e); 
		} 
	}


} 
